package com.sky.yipinyoufujava;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;


// 提供springBoot项目启动器
@SpringBootApplication
public class YipinyoufuJavaApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(YipinyoufuJavaApplication.class, args);
    }

    // 重写一个父类中的方法configure(),执行 初始化的项目启动类是谁（YipinyoufuJavaApplication）
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder){
//        return super.configure(builder);
        return builder.sources(YipinyoufuJavaApplication.class);
    }
}
